﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace HWCWorker_Worker
{

    // NOTE: If you change the interface name "IMasterElectionService" here, you must also update the reference to "IMasterElectionService" in App.config.
    [ServiceContract]
    public interface IMasterElectionService
    {
        [OperationContract(IsOneWay = true)]
        void ProposeElection(string roleInstanceId);

        [OperationContract(IsOneWay = true)]
        void CastElection(string roleInstanceId, int logNumber, long logPosition);
        
        [OperationContract(IsOneWay = true)]
        void BroadcastVictory(List<string> chain);

        [OperationContract]
        bool IsRunning();

        [OperationContract]
        string QueryMaster();
    }
}
